home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 2 / ACE CD 2.iso / FILES / UTILS / HSBASIC2.DMS / in.adf / HB2Examples2.0.Lha / Examples / EmBClass / ReadMe < prev   
Encoding:
Text File  |  1994-04-14  |  1.5 KB  |  30 lines

  1. EmBClass.bas - Demonstration of a BOOPSI private image class
  2. ============================================================
  3.  
  4. Derived from Commodore-Amiga example (c) Copyright 1992 Commodore-Amiga, Inc.
  5.  
  6. This is a translation of a Commodore example using the Workbench 2 BOOPSI
  7. object oriented intuition features.
  8.  
  9. The example shows simple sub-classing of the the BOOPSI imageclass to
  10. implement a embossed box (there are easier ways than this, but its just
  11. an example!): the main program (EmBDemo.bas), initialises the class, creates
  12. and instance and then draws it in both states via Intuition's DrawImageState.
  13. The sub-class (EmBClass.bas) is entered via the hook mechanism, initialised
  14. in initEmBClass. Only one method of the super-class is specialised in this
  15. class, the IM_DRAW method, used for drawing the image in the appropriate
  16. state. Note that BOOPSI sub-classes may execute as part of several tasks
  17. simultaneously (i.e. they must be re-entrant), also almost all checks must
  18. be disabled since the system stacks will not be where the BASIC runtime
  19. routines expect.
  20.  
  21. The example will work on versions of Workbench 2.0 or later (V36 and above)
  22.  
  23. Compiling
  24. ---------
  25. Load the EmBClass_inc.bh file and Tokenise it (Program-Tokenise), making sure
  26. you have no token file selected in the File Options (Settings-Compiler-Files).
  27. Once you have your token file, set the File Options-Token File setting to the
  28. EmBClass_inc.t file just created. Load the EmBDemo.bas file, compile and run
  29. it.
  30.